<template>
  <div>
    <div class="top-part">
      <!-- 单独一个按钮时 -->
      <div class="button-part">
        <slot name="buttonPart"/>
      </div>
      <!-- 表单 -->
      <div class="form-part">
        <slot name="formPart"></slot>
      </div>
    </div>
    <!-- 数量显示 -->
    <div class="totalCount" v-if="totalNum">
      <el-alert
        type="info"
        :closable="false"
        show-icon>
        <template #title>
          <span>数据一共 {{totalNum}} 条</span>
        </template>
      </el-alert>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PageTools',
  props: {
    totalNum: Number
  },
  data() {
    return {

    }
  },

  methods: {

  },
};
</script>

<style lang="scss" scoped>
.top-part{
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  flex-wrap: wrap;
}
.button-part{
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-end;
  height: 40px;
}
// .totalCount{
//   margin-top: 10px;
// }
</style>
